package com.exam.baidu;

import java.util.Arrays;
import java.util.HashMap;
import java.util.Scanner;
import java.util.TreeMap;

/**
 * date:
 * description:
 */
public class Solution002 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int T = scanner.nextInt();
        for (int i = 0; i < T; i++) {
            int N = scanner.nextInt();
            int res = findPairs(N);
            System.out.println(res);
        }
    }

    private static int findPairs(int N) {
        TreeMap<Integer, Integer> map = new TreeMap<Integer, Integer>();
        map.put(1, 1);
        int cur = N;
        for (int i = 2; i * i < N; i++) {
            int count = 0;
            while(cur > 1 && cur % i == 0){
                cur /= i;
                count++;
            }
            if(count > 0){
                map.put(i, count);
            }
            if(cur == 1){
                break;
            }
        }
        if(cur > 1){
            map.put(N, 1);
        }
        int size = map.size();
        int[] nums = new int[size];
        int index = 0;
        for (Integer num : map.keySet()) {
            nums[index++] = (int) Math.pow(num, map.get(num));
        }
        Arrays.sort(nums);
        int ind = 0;
        int cum = nums[0];
        while(cum * cum < N){
            ind++;
            cum *= nums[ind];
        }
//        ind--;
        return ind * size;
    }
}
